How can I tell if I have permission to modify the locale for an attribute definition? If I try to change the locale for the attribute definition for the "Created By" attribute, this fails...no surprise! But without looking at the attribute name, how can I tell if I am allowed to modify the locale for an attribute definition? I tried checking canCreateDef() and canCreateVal(), but those are both true for "Created By". I'd rather not have to use noError/lastError for this, because I want to know in advance if I am OK to make the change or not! Regards, strathglass - Thu Jul 27 15:05:38 EDT 2017 | |||||||||||||||||||||
Re: Attribute locale access rights? Short test on my side: I created an attribute "Test" and set access for the attribute definition for me to "read" ... This made the "locale" field unavailable in the GUI. The DXL code: AttrDef ad = find(current, "Test") print canModifyDef(ad) prints false. So I would suggest to check for ad.system and for canModifyDef(ad) ... Hope it helps, regards, Mathias | |||||||||||||||||||||
Re: Attribute locale access rights? Thanks. I am trying to update locale for text and string object attributes. I was looking for a "modify" type function, but of course the one you mention is not documented! However when I try it on system attribute "Last Modified By", I get canModifyDef(ad) as true, so that doesn't work. I think I will just resort to skipping any text or string object attribute if it is of type system unless it is Object Text, Object Heading, or Object Short Text, which all work. Although I think canModify(current Module,attrName) may work in exclusive edit mode (or it is just a coincidence?):
| |||||||||||||||||||||